# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Lukas Spies <lukas (at) photoqt _dot_ org>

pkgname=python-symengine
_pkgname=symengine.py
pkgver=0.10.0
pkgrel=4
arch=(loong64 x86_64)
pkgdesc='Python wrappers for SymEngine'
url='https://github.com/symengine/symengine.py'
depends=(python symengine)
makedepends=(cmake cython cereal llvm)
license=(MIT)
source=(https://github.com/symengine/symengine.py/archive/v$pkgver/$_pkgname-$pkgver.tar.gz)
sha256sums=('923944ab54aa0a787629424c101f5ec6a87b44177c669d21c7d3b0257f725927')

build() {
  cmake -B build -S $_pkgname-$pkgver \
    -DCMAKE_INSTALL_PREFIX=/usr
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
  install -Dm644 $_pkgname-$pkgver/LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
}
